#define _CRT_SECURE_NO_WARNINGS 1
lass Solution{
public:
    int lengthOfLIS(vector<int>&nums) {
        int n = nums.size();
        vector<int> dp(n,1);

        for (int i = 1; i < n; i++)
        {
            for (int j = 0; j < i; j++)
            {
                if (nums[i] > nums[j])
                {
                    dp[i] = max(dp[j] + 1,dp[i]);
                }

            }
        }
        int ret = 0;
        for (int i = 0; i < n; i++)
        {
            ret = max(ret,dp[i]);
        }
        return ret;

    }
};